package com.fzy.designpattern.observer.jdk;

/**
 * 测试类
 *
 * @author 冯赵杨
 * @create 2018/9/12
 */
public class MyObserverTest {
    public static void main(String[] args) {
        ConcreteSubject subject = new ConcreteSubject();

        MyObserver observer1 = new MyObserver();
        MyObserver observer2 = new MyObserver();

        subject.addObserver(observer1);
        subject.addObserver(observer2);

        subject.set(123);
    }
}
